import express from 'express';
import StudentController from '../controller/studentCtrl.js';

const router = express.Router();

// Student search and list routes
router.get('/students/search', StudentController.search);
router.get('/students/page/:page', StudentController.getList);
router.get('/students/:id', StudentController.getById);

// Student profile management
router.put('/students/:id', StudentController.update);
router.delete('/students/:id', StudentController.delete);

// Authentication routes
router.get('/check-email', StudentController.checkEmail);
router.post('/login', StudentController.login);
router.post('/register', StudentController.register);
router.post('/reset-password', StudentController.resetPassword);

export default router;